home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Toolbox / Menu Defproc 1.0.3 / Concordia.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-29  |  2.1 KB  |  81 lines  |  [TEXT/MPS ]

  1. #ifndef _concordia_
  2. #define _concordia_
  3. /******************************************************************************\
  4. * Header Files
  5. \******************************************************************************/
  6.  
  7. #ifndef __QUICKDRAW__
  8. #include <Quickdraw.h>
  9. #endif
  10.  
  11. #ifndef __SYSEQU__
  12. #include <SysEqu.h>
  13. #endif
  14.  
  15.  
  16. /******************************************************************************\
  17. * Constants and Macros
  18. \******************************************************************************/
  19.  
  20. #define null         0             //Generic null
  21. #define cmmdCharCode ((char) 0x11) //ASCII code of command character
  22.  
  23. /* Find length of a Pascal string in bytes */
  24. #define strSize(StrPtr) ((int)StrPtr[0]+1)
  25.  
  26. /* System Globals */
  27. #define sgTopMenuItem  *((short *) 0x0A0A)
  28. #define sgAtMenuBottom *((short *) 0x0A0C)
  29. #define sgMBSaveLoc   *((Handle *) 0xB5C) //I guess MBDF 0 stores a handle here
  30.  
  31.  
  32. /******************************************************************************\
  33. * Type Declarations
  34. \******************************************************************************/
  35.  
  36. typedef struct
  37.     {
  38.     char    privates [76];
  39.     long    randSeed;
  40.     BitMap  screenBits;
  41.     Cursor  arrow;
  42.     Pattern dkGray;
  43.     Pattern ltGray;
  44.     Pattern gray;
  45.     Pattern black;
  46.     Pattern white;
  47.     GrafPtr thePort;
  48.     } QDGlobal;
  49.  
  50. /* Pointer to Quickdraw Globals */
  51. #define qdGlobPtr ((QDGlobal *) (**((GrafPtr ***) CurrentA5) + 1) - 1)
  52.  
  53. /* Text state */
  54. typedef struct
  55.     {
  56.     short txFace;  //Typeface
  57.     Style txStyle; //Typestyle
  58.     short txMode;  //How is text drawn?
  59.     short txSize;  //Typesize
  60.     } TextStateRec;
  61.  
  62. /* Menu information for one menu item (except for item string) */
  63. typedef struct
  64.     {
  65.     Byte  iconNum;   //Icon resource ID
  66.     char  kbdEquiv;  //Keyboard menu equivalent
  67.     char  markChar;  //Character mark
  68.     Style charStyle; //Item's character style
  69.     } ItemInfoRec, *ItemInfoPtr;
  70.  
  71.  
  72. /******************************************************************************\
  73. * Function Prototypes
  74. \******************************************************************************/
  75.  
  76. void GetTextState (TextStateRec *);
  77. void SetTextState (TextStateRec *);
  78.  
  79.  
  80. #endif
  81.